<?php
	$sql="SELECT * FROM tbl_config WHERE `key`='$_POST[key]'";
	$res=mysql_query($sql);
			
	if(!$res)
		die();
		
	$row=mysql_fetch_array($res);
?>
<form name="f" method="POST">
	<input type="hidden" name="act" value="actionUpdate"></input>
	<input type="hidden" name="key" value="<?php echo $_POST["key"];?>"></input>
	<table class='tbl_action'>
		<tr>
			<th>Tham số</th>
			<td>
				<input type="text" name='name' value='<?php echo $row['name']; ?>'></input>
			</td>
		</tr>
		<tr>
			<th>Giá trị</th>
			<td><textarea name='content'><?php echo $row['content'];?></textarea></td>
		</tr>
		<tr>
			<th></th>
			<td>
				<input type="submit" value="Sửa"></input>
				<input type="reset" value="Mặc định"></input>
				<input type="button" value="Đóng" onclick="window.location='?zone=config'"></input>
			</td>
		</tr>
	</table>
</form>
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<?php
	if($row['key']!='pword'&&$row['key']!='uname'&&$row['key']!='keywords'&&$row['key']!='banner'&&$row['key']!='email')
	{ 
?>
<script type="text/javascript">
	var oFCKeditor = new FCKeditor('content');
	oFCKeditor.Height	= "400";
	oFCKeditor.Width	= "650";
	oFCKeditor.ReplaceTextarea();
</script>
<?php
	} 
?>
